package clientCommunication;

public class CommunicationFactory {
	public static ICommunication createCommunication(String port, String ipaddress, boolean isSynchronous) throws Exception {
		ICommunication communication;
		if (isSynchronous) {
			communication = new CommunicationSync(port, ipaddress);
		} else {
			communication = new CommunicationAsync(port, ipaddress);
		}
			
		return communication;		
	}
}
